package com.tiansu.reborn.wanda.modules.executor.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tiansu.reborn.wanda.modules.executor.entity.vo.BillRepairExcelVO;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 账单表 实体
 * 
 * @author ${author}
 * @email ${email}
 * @date 2019-11-18 19:37:20
 */
@Data
@TableName("TE_PAYMENT_BILL_DAY")

public class BillDayEntity implements Serializable {
	
    private static final long serialVersionUID = 1L;

	/**
	 * $column.comments
	 */
	@TableId
	private Integer id;
	/**
	 * $column.comments
	 */
	private Date recdate;
	/**
	 * $column.comments
	 */
	private Integer deviceid;
	/**
	 * $column.comments
	 */
	private Integer settletype;
	/**
	 * $column.comments
	 */
	private String settletypename;
	/**
	 * $column.comments
	 */
	private Integer energysort;
	/**
	 * $column.comments
	 */
	private String energysortname;
	/**
	 * $column.comments
	 */
	private Integer billtimes;
	/**
	 * 总
	 */
	private Float startcount1;
	/**
	 * $column.comments
	 */
	private Float endcount1;
	/**
	 * $column.comments
	 */
	private Float sumcount1;
	/**
	 * $column.comments
	 */
	private Float price1;
	/**
	 * $column.comments
	 */
	private Float paycount1;
	/**
	 * 峰
	 */
	private Float startcount2;
	/**
	 * $column.comments
	 */
	private Float endcount2;
	/**
	 * $column.comments
	 */
	private Float sumcount2;
	/**
	 * $column.comments
	 */
	private Float price2;
	/**
	 * $column.comments
	 */
	private Float paycount2;
	/**
	 * 谷
	 */
	private Float startcount3;
	/**
	 * $column.comments
	 */
	private Float endcount3;
	/**
	 * $column.comments
	 */
	private Float sumcount3;
	/**
	 * $column.comments
	 */
	private Float price3;
	/**
	 * $column.comments
	 */
	private Float paycount3;
	/**
	 * 平
	 */
	private Float startcount4;
	/**
	 * $column.comments
	 */
	private Float endcount4;
	/**
	 * $column.comments
	 */
	private Float sumcount4;
	/**
	 * $column.comments
	 */
	private Float price4;
	/**
	 * $column.comments
	 */
	private Float paycount4;
	/**
	 * $column.comments
	 */
	private Integer changeflag;
	/**
	 * $column.comments
	 */
	private Integer occupied;
	/**
	 * $column.comments
	 */
	private String bindedinfo;
	/**
	 * $column.comments
	 */
	private Float meanelec;
	/**
	 * $column.comments
	 */
	private Long accountid;
	/**
	 * $column.comments
	 */
	private String accountname;
	/**
	 * $column.comments
	 */
	private Float meanpay;
	/**
	 * $column.comments
	 */
	private Float balance;
	/**
	 * 尖
	 */
	private Float startcount5;
	/**
	 * $column.comments
	 */
	private Float endcount5;
	/**
	 * $column.comments
	 */
	private Float sumcount5;
	/**
	 * $column.comments
	 */
	private Float price5;
	/**
	 * $column.comments
	 */
	private Float paycount5;

	public BillDayEntity(){}
	
	public BillDayEntity(BillRepairExcelVO vo)
    {
        this.recdate = vo.getRecdate();
        this.deviceid = vo.getDeviceid();
        this.billtimes = vo.getBilltimes();
        
        this.startcount1 = vo.getStartcount1();
        this.endcount1 = vo.getEndcount1();
        this.price1 = vo.getPrice1();
        this.sumcount1 = vo.getEndcount1() - vo.getStartcount1();
        this.paycount1 = this.sumcount1 * this.price1;
        
        this.startcount2 = vo.getStartcount2();
        this.endcount2 = vo.getEndcount2();
        this.price2 = vo.getPrice2();
        this.sumcount2 = vo.getEndcount2() - vo.getStartcount2();
        this.paycount2 = this.sumcount2 * this.price2;
        
        this.startcount3 = vo.getStartcount3();
        this.endcount3 = vo.getEndcount3();
        this.price3 = vo.getPrice3();
        this.sumcount3 = vo.getEndcount3() - vo.getStartcount3();
        this.paycount3 = this.sumcount3 * this.price3;
        
        this.startcount4 = vo.getStartcount4();
        this.endcount4 = vo.getEndcount4();
        this.price4 = vo.getPrice4();
        this.sumcount4 = vo.getEndcount4() - vo.getStartcount4();
        this.paycount4 = this.sumcount4 * this.price4;
        
        this.startcount5 = vo.getStartcount5();
        this.endcount5 = vo.getEndcount5();
        this.price5 = vo.getPrice5();
        this.sumcount5 = vo.getEndcount5() - vo.getStartcount5();
        this.paycount5 = this.sumcount5 * this.price5;
        
        if(1 == this.billtimes)
        {
            this.paycount1 =  this.paycount2 + this.paycount3 + this.paycount4 + this.paycount5;
        }
       
    }

}
